<!DOCTYPE html>
<html>
<head>
<title>菜单管理</title>

<link href="../../../common/all.css" rel="stylesheet">
<script type="text/javascript" src="../../../common/all.js"></script>

</script>
</head>

<body style="overflow-x: hidden; overflow-y: hidden;">

        
        <form action="" class="breadcrumb form-search " id="_search_form">
             &nbsp;菜单名称: <input class="input-xlarge" name="name"  id="_menuName" type="text" />
			 &nbsp;<input id="_search_submit" class="btn btn-primary" type="button" value="查询"/>
		</form>
		
		
		
	<ul class="nav nav-tabs">
		<li class="active">
			<a href="menulist.html">菜单列表</a>
		</li>
		<li>
			<a href="menuAdd.html">添加菜单</a>
		</li>
	</ul>
	
		

	<div class="panel panel-default">
		<table id="_menu_table" class="table table-striped">
			<thead>
				<tr>
					<th>序号</th>
					<th>id</th>
					<th>菜单名称</th>
<!-- 					<th>类型</th> -->
					<th>状态</th>
<!-- 					归属机构 -->
					<th>创建时间</th>
					<th>操作</th>
				</tr>
			</thead>

			<tbody>
				
			</tbody>

		</table>

    <div class="pagination" id="_pagination">
    
</div>
	
	
	
<script type="text/javascript">

//初始化
$(function() {
	var param=new Object();	
	    param.status="0";
	//初始化数据	
	pageFn(getContextPath()+"/sys/menu/list",param,"get");
})


/**分页回调处理**/
function callbak_page(returnDatas)
{
	var tableHTML = "";
	var trContext = $("#_menu_table");
	$("#_menu_table tbody tr").remove();
	var returnData = returnDatas.data.items;
	
	if(returnData==null){
	  return;
	}
	for (var i = 0; i < returnData.length; i++) {
	var j=i;
	//状态处理
	//var sta=returnData[i].status;
	var staName="";
	var operation='';
	//var operation='系统扫描,是否有必要做后台操作？';
				   
	tableHTML += "<tr>" + "<td>"
				+ (j + 1)
				+ "</td>"
				+ "<td>"
				+ returnData[i].id
				+ "</td>"
				+ "<td>"
				+ returnData[i].name
				+ "</td>"										
				+ "<td>"
				+ returnData[i].status
				+ "</td>"
				+ "<td>"
				+ returnData[i].createTime
				+ "</td>"						
				+ "<td>"
				+operation									
				+"</td>" 
				+ "</tr>"
	
	}
	trContext.append(tableHTML);

}

//查询
$("#_search_submit").click(
	function(){
	 var param=getParam();
	 sendPageRequst(getContextPath()+"/sys/user/list",param);
	   
	  // sendGetReq(getContextPath()+"/sys/user/list",param,"");
});

//获取参数处理
function getParam()
{				
	 var param=new Object();	
	
	 var _menuName=$("#_menuName").val();
	 if(_menuName!=""){
		 param.name=_menuName;
	 }
	 
	return param;			 
}




</script>

</body>
</html>